﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace POS.UserControl
{
    public partial class ListButtonUC : DevExpress.XtraEditors.XtraUserControl
    {
        public ListButtonUC()
        {
            InitializeComponent();
        }
        private void btnClose_Click(object sender, EventArgs e)
        {
            this.FindForm().Close();
        }
        public SimpleButton Query
        {
            get { return this.btnQuery; }
        }
        public SimpleButton New
        {
            get { return this.btnNew; }
        }
        public SimpleButton PayDebt
        {
            get { return this.btnPayDebt; }
        }
        public void IsHide(List<string> names)
        {
            foreach (Control c in this.Controls)
            {
                SimpleButton button = c as SimpleButton;
                if (button == null) continue;
                if (names.Contains(button.Name))
                    button.Visible = false;
            }
        }
    }
}
